package com.originskyseed.platform.cms.service;

import java.util.List;
import java.util.Map;

import com.originskyseed.platform.cms.model.CmsRelateIsRead;
import com.originskyseed.platform.core.base.BasePage;

/**
 * 新闻关联人员是否阅读表Service接口类（OSI_CMS_RELATE_IS_READ）
 *
 * @author wlj
 */
public interface ICmsRelateIsReadService {

	/**
	 * 删除记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 批量删除记录
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(CmsRelateIsRead record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(CmsRelateIsRead record) throws Exception;

	/**
	 * 批量插入记录
	 *
	 * @param list
	 * @return
	 * @throws Exception
	 */
	public int insertBatch(List<CmsRelateIsRead> list) throws Exception;

	/**
	 * 已读
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int updateIsReadByCmsId(String id, String objId) throws Exception;

	/**
	 * 查询已读未读
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public Integer selectIsReadByCmsId(String id, String objId) throws Exception;

	/**
	 * 已读
	 * 
	 * @param idsList
	 * @param objId
	 * @return
	 * @throws Exception
	 */
	public int updateIsReadByIds(List<String> idsList, String objId) throws Exception;

	/**
	 * 更新记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(CmsRelateIsRead record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(CmsRelateIsRead record) throws Exception;

	/**
	 * 查询记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public CmsRelateIsRead selectByPrimaryKey(String id) throws Exception;

	/**
	 * 查询列表
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<CmsRelateIsRead> selectList(CmsRelateIsRead record) throws Exception;

	/**
	 * 查询列表带维度信息
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<CmsRelateIsRead> selectCmsRelateReadList(CmsRelateIsRead record) throws Exception;

	/**
	 * 分页查询列表
	 *
	 * @param params
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public BasePage<CmsRelateIsRead> selectListByPage(Map<String, Object> params, BasePage<CmsRelateIsRead> page) throws Exception;

}
